home *** CD-ROM | disk | FTP | other *** search
- public class Discipline extends Codex {
- protected static final int CONSOLE_FLAG_DISCIPLINECAST = 8;
- protected static final int CONSOLE_FLAG_DISCIPLINERECAST = 8;
- protected static final int CONSOLE_FLAG_DISCIPLINEFIZZLE = 8;
- protected static final int CONSOLE_FLAG_DISCIPLINERESIST = 0;
- protected static final int CONSOLE_FLAG_DISCIPLINENOCAST = 0;
- protected static final int[] AWE_DURATIONS = new int[]{5000, 10000, 15000, 20000, 25000};
- protected static final int[] ATROPHY_DURATIONS = new int[]{10000, 20000, 30000, 40000, 50000};
- protected static final int[] BECKONING_DURATIONS = new int[]{15000, 30000, 45000, 60000, 90000};
- protected static final int[] BLOODHEALING_DURATIONS = new int[]{4000, 8000, 8000, 16000, 16000};
- protected static final int[] BLOODDEXTERITY_DURATIONS = new int[]{15000, 30000, 45000, 60000, 90000};
- protected static final int[] BLOODSTRENGTH_DURATIONS = new int[]{15000, 30000, 45000, 60000, 90000};
- protected static final int[] BLOODSTAMINA_DURATIONS = new int[]{15000, 30000, 45000, 60000, 90000};
- protected static final int[] BLOODOFPOTENCY_DURATIONS = new int[]{15000, 30000, 45000, 60000, 90000};
- protected static final int[] CELERITY_DURATIONS = new int[]{15000, 30000, 45000, 60000, 90000};
- protected static final int[] CLOAKOFSHADOWS_DURATIONS = new int[]{15000, 30000, 45000, 60000, 90000};
- protected static final int[] CLOAKTHEGATHERING_DURATIONS = new int[]{10000, 20000, 30000, 40000, 60000};
- protected static final int[] COMMAND_DURATIONS = new int[]{3000, 6000, 9000, 12000, 15000};
- protected static final int[] DARKHUNTER_DURATIONS = new int[]{15000, 30000, 45000, 60000, 90000};
- protected static final int[] DREADGAZE_DURATIONS = new int[]{5000, 10000, 15000, 20000, 25000};
- protected static final int[] ENTRANCEMENT_DURATIONS = new int[]{9000, 12000, 15000, 18000, 21000};
- protected static final int[] EYESOFTHESERPENT_DURATIONS = new int[]{5000, 10000, 15000, 20000, 20000};
- protected static final int[] EYESOFTHEBEAST_DURATIONS = new int[]{30000, 60000, 90000, 120000, 150000};
- protected static final int[] EARTHMELD_DURATIONS = new int[]{30000, 60000, 90000, 120000, 150000};
- protected static final int[] FERALWHISPERS_DURATIONS = new int[]{15000, 30000, 45000, 60000, 90000};
- protected static final int[] FERALCLAWS_DURATIONS = new int[]{15000, 30000, 45000, 60000, 90000};
- protected static final int[] FLAMETRAIL_DURATIONS = new int[]{15000, 30000, 45000, 60000, 90000};
- protected static final int[] FORTITUDE_DURATIONS = new int[]{30000, 60000, 90000, 120000, 180000};
- protected static final int[] HATCHTHEVIPER_DURATIONS = new int[]{15000, 30000, 45000, 60000, 90000};
- protected static final int[] HEARTOFSTONE_DURATIONS = new int[]{30000, 60000, 90000, 120000, 150000};
- protected static final int[] HSENSES_DURATIONS = new int[]{30000, 60000, 90000, 120000, 150000};
- protected static final int[] IGNOREFLAME_DURATIONS = new int[]{15000, 30000, 45000, 60000, 90000};
- protected static final int[] INVISIBILITY_DURATIONS = new int[]{15000, 30000, 45000, 60000, 90000};
- protected static final int[] MAJESTY_DURATIONS = new int[]{10000, 20000, 30000, 40000, 60000};
- protected static final int[] MASK1000FACES_DURATIONS = new int[]{15000, 30000, 45000, 60000, 75000};
- protected static final int[] MESMERIZE_DURATIONS = new int[]{5000, 10000, 15000, 20000, 25000};
- protected static final int[] MISTFORM_DURATIONS = new int[]{15000, 30000, 45000, 60000, 90000};
- protected static final int[] OBFUSCATE_DURATIONS = new int[]{15000, 30000, 45000, 60000, 90000};
- protected static final int[] POSSESSION_DURATIONS = new int[]{15000, 30000, 45000, 60000, 90000};
- protected static final int[] POTENCE_DURATIONS = new int[]{30000, 60000, 90000, 120000, 180000};
- protected static final int[] PRISONOFICE_DURATIONS = new int[]{2000, 4000, 6000, 8000, 10000};
- protected static final int[] PSYCHICPROJECTION_DURATIONS = new int[]{9000, 10000, 12000, 15000, 19000};
- protected static final int[] QUELLTHEBEAST_DURATIONS = new int[]{5000, 7000, 9000, 11000, 13000};
- protected static final int[] SHAMBLINGHORDES_DURATIONS = new int[]{15000, 30000, 45000, 60000, 90000};
- protected static final int[] SHAPEOFTHEBEAST_DURATIONS = new int[]{15000, 30000, 45000, 60000, 90000};
- protected static final int[] SKINOFTHEADDER_DURATIONS = new int[]{30000, 60000, 90000, 120000, 180000};
- protected static final int[] SUBSUMETHESPIRIT_DURATIONS = new int[]{15000, 30000, 45000, 60000, 90000};
- protected static final int[] SUMMONELEMENTAL_DURATIONS = new int[]{15000, 30000, 45000, 60000, 90000};
- protected static final int[] SUMMONSOUL_DURATIONS = new int[]{15000, 30000, 45000, 60000, 90000};
- protected static final int[] THEFORGETFULMIND_DURATIONS = new int[]{2500, 5000, 7500, 10000, 12500};
- protected static final int[] THEHAUNTING_DURATIONS = new int[]{5000, 10000, 15000, 20000, 25000};
- protected static final int[] TORCH_DURATIONS = new int[]{15000, 30000, 45000, 60000, 90000};
- protected static final int[] TRUEFAITH_DURATIONS = new int[]{2500, 5000, 7500, 10000, 12500};
- protected static final int[] TRUESIGHT_DURATIONS = new int[]{30000, 60000, 90000, 120000, 150000};
- protected static final int[] VIGORMORTIS_DURATIONS = new int[]{15000, 30000, 45000, 60000, 90000};
- protected static final int[] VOICEOFMADNESS_DURATIONS = new int[]{10000, 20000, 30000, 40000, 50000};
- protected static final float[] AWAKEN_HEALTHS = new float[]{0.15F, 0.3F, 0.45F, 0.6F, 0.75F};
- protected static final float[] AWAKEN_BLOODS = new float[]{0.15F, 0.15F, 0.2F, 0.2F, 0.25F};
- protected static final float[] SHAMBLINGHORDES_BLOODS = new float[]{0.05F, 0.1F, 0.15F, 0.2F, 0.25F};
- protected static final float[] SHAMBLINGHORDES_HEALTHS = new float[]{0.05F, 0.1F, 0.15F, 0.2F, 0.25F};
- protected static final float[] VIGORMORTIS_BLOODS = new float[]{0.1F, 0.2F, 0.3F, 0.4F, 0.5F};
- protected static final float[] VIGORMORTIS_HEALTHS = new float[]{0.1F, 0.2F, 0.3F, 0.4F, 0.5F};
- protected static final float CLOAKOFSHADOWS_ALPHA_NONE = 1.0F;
- protected static final float[] CLOAKOFSHADOWS_ALPHAS = new float[]{0.25F, 0.2F, 0.15F, 0.1F, 0.05F};
- protected static final float CLOAKTHEGATHERING_ALPHA_NONE = 1.0F;
- protected static final float[] CLOAKTHEGATHERING_ALPHAS = new float[]{0.25F, 0.2F, 0.15F, 0.1F, 0.05F};
- protected static final String[] FERALCLAWS_TEMPLATES = new String[]{"Claw01", "Claw02", "Claw03", "Claw04", "Claw05"};
- protected static final String[] FLASH_TEMPLATES = new String[]{"exp_flash", "exp_flash", "exp_flash", "exp_flash", "exp_flash"};
- protected static final int[] FIREBALL_DAMAGES = new int[]{10, 20, 30, 40, 50};
- protected static final float INVISIBILITY_ALPHA_NONE = 1.0F;
- protected static final float[] INVISIBILITY_ALPHAS = new float[]{0.25F, 0.2F, 0.15F, 0.1F, 0.05F};
- protected static final float MISTFORM_ALPHA_NONE = 1.0F;
- protected static final float[] MISTFORM_ALPHAS = new float[]{0.25F, 0.2F, 0.15F, 0.1F, 0.05F};
- protected static final float OBFUSCATE_ALPHA_NONE = 1.0F;
- protected static final float[] OBFUSCATE_ALPHAS = new float[]{0.25F, 0.2F, 0.15F, 0.1F, 0.05F};
- protected static final String[] PLAGUEWIND_TEMPLATES = new String[]{"proj_plaguewind0", "proj_plaguewind1", "proj_plaguewind2", "proj_plaguewind3", "proj_plaguewind4"};
- protected static final String[] TRUEFAITH_TEMPLATES = new String[]{"exp_truefaith", "exp_truefaith1", "exp_truefaith2", "exp_truefaith3", "exp_truefaith4"};
- protected static final String[] EYESOFTHEBEAST_TEMPLATES = new String[]{"exp_eyesofthebeast", "exp_eyesofthebeast1", "exp_eyesofthebeast2", "exp_eyesofthebeast3", "exp_eyesofthebeast4"};
- protected int lastCasterGuid;
- protected int lastTargetGuid;
- protected int lastWorldGuid;
- protected CodexActor casterThing;
- protected CodexActor targetThing;
- protected CodexWorld world;
-
- public void DisplayRecast(String disciplineName, int level) {
- String casterName = this.casterThing.GetName();
- int clientGuid = this.casterThing.GetGUID();
- String aFormat = "%C" + casterName + "%d" + disciplineName;
- CodexConsole.PrintFormatNLS(clientGuid, 8, "RPG_DISCMSG_RECASTS", aFormat);
- }
-
- public boolean CheckCastParameters(int level, int casterGuid, String disciplineName) {
- if (level >= 0 && level <= 4) {
- if (!Codex.IsActorGuid(casterGuid)) {
- CodexConsole.PrintError("Invalid caster in Discipline " + disciplineName);
- return false;
- } else {
- if (casterGuid != this.lastCasterGuid) {
- this.casterThing = new CodexActor(casterGuid);
- this.lastCasterGuid = casterGuid;
- }
-
- return true;
- }
- } else {
- CodexConsole.PrintError("Invalid level in Discipline " + disciplineName);
- return false;
- }
- }
-
- public void DisplayCast(String disciplineName, int level) {
- String casterName = this.casterThing.GetName();
- int clientGuid = this.casterThing.GetGUID();
- String aFormat = "%C" + casterName + "%d" + disciplineName;
- CodexConsole.PrintFormatNLS(clientGuid, 8, "RPG_DISCMSG_CASTS", aFormat);
- }
-
- public void DisplayResist(String disciplineName, int level) {
- String targetName = this.targetThing.GetName();
- int clientGuid = this.casterThing.GetGUID();
- String aFormat = "%C" + targetName + "%d" + disciplineName;
- CodexConsole.PrintFormatNLS(clientGuid, 0, "RPG_DISCMSG_RESISTED", aFormat, 16776960);
- }
-
- public boolean CheckCastTarget(int targetGuid, String disciplineName) {
- if (!Codex.IsActorGuid(targetGuid)) {
- CodexConsole.PrintError("Invalid target in Discipline" + disciplineName);
- return false;
- } else {
- if (targetGuid != this.lastTargetGuid) {
- this.targetThing = new CodexActor(targetGuid);
- this.lastTargetGuid = targetGuid;
- }
-
- return true;
- }
- }
-
- public void DisplayFizzle(String disciplineName, int level) {
- String casterName = this.casterThing.GetName();
- int clientGuid = this.casterThing.GetGUID();
- String aFormat = "%C" + casterName + "%d" + disciplineName;
- CodexConsole.PrintFormatNLS(clientGuid, 8, "RPG_DISCMSG_FIZZLES", aFormat, 16776960);
- }
-
- public void DisplayNoCast(String stringId) {
- int clientGuid = this.casterThing.GetGUID();
- if (Codex.IsPlayerGuid(clientGuid)) {
- CodexConsole.PrintNLS(clientGuid, 0, stringId, 16776960);
- }
-
- }
-
- public boolean Fizzled(int level) {
- if ((this.casterThing.GetActorFlags2() & 512) != 0) {
- return false;
- } else {
- return Math.random() < (double)((float)(5 - level) / 100.0F);
- }
- }
-
- public boolean SetupWorld(String disciplineName) {
- this.world = new CodexWorld(12345678);
- if (this.world.GetGUID() <= 0) {
- CodexConsole.PrintError("Cannot find world in Discipline" + disciplineName);
- return false;
- } else {
- return true;
- }
- }
- }
-